# Contributor: Lindsay Zhou <i@lin.moe>
# Maintainer: Lindsay Zhou <i@lin.moe>
pkgname=fcitx5-hangul
pkgver=5.1.5
pkgrel=0
pkgdesc="libhangul input method support for fcitx5"
url="https://github.com/fcitx/fcitx5-hangul"
arch="all"
license="GPL-3.0-or-later"
makedepends="
	cmake
	extra-cmake-modules
	gettext-dev
	fcitx5-dev
	libhangul-dev
	samurai
	"
subpackages="$pkgname-lang"
source="$pkgname-$pkgver.tar.gz::https://github.com/fcitx/fcitx5-hangul/archive/refs/tags/$pkgver.tar.gz"
options="!check" # no tests

build() {
	CXXFLAGS="$CXXFLAGS -flto=auto" \
	CFLAGS="$CFLAGS -flto=auto" \
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
0cb11f1192740c2a29f127e0397042972e9fcf613b01eab5eb0ac3ad1cf84c244e1c758a9d60848d12b4eda54b8d882b64ddbdfa5f464a8a5a3be9c9f6b3fb23  fcitx5-hangul-5.1.5.tar.gz
"
